'use strict'
const menu = {
  state: {
    menu: [],
    actionmenu: {}
  },
  getters: {
    menu: state => state.menu,
    actionmenu: state => state.actionmenu
  },
  mutations: {
    saveMenu (state, menu) {
      state.menu = menu
    },
    updateActionMenu (state, actionmenu) {
      state.actionmenu = actionmenu
    },
    clearActionMenu (state) {
      state.actionmenu = {}
    }
  },
  actions: {
    saveMenu ({commit}, menu) {
      commit('savemenu', menu)
    },
    updateActionMenu ({commit}, actionmenu) {
      commit('updateActionMenu', actionmenu)
    },
    clearActionMenu ({commit}) {
      commit('clearActionMenu')
    }
  }
}
export default menu
